#include <iostream>
using namespace std;

int main()
{
	int a1, a2, n = 0;
	cin >> a1 >> a2 >> n;
	if (n == 1)
		cout << a1 << endl;
	else if (n == 2)
		cout << a2 << endl;
	else 
		cout << a2 + (a2 - a1) * (n - 2) << endl; 
	return 0;
}

